/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package co.edu.unal.bioingenium.kbmed.text.filter2;

import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author Alejandro Riveros Cruz
 */
public class FilterChain {

    private List<Filter> chain = new ArrayList<Filter>();

    /**
     * 
     * @param s
     * @return
     */
    public String doFilterChain(String s) {
        StringBuilder sb = new StringBuilder(s);
        for (Filter filter : chain) {
            sb = filter.doFilter(sb);
        }
        return sb.toString();
    }
}
